package com.hnluchuan.staff.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.hnluchuan.core.model.BaseModel;

import javax.persistence.ManyToOne;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import com.hnluchuan.staff.model.Employee;

/**
 * 家庭成员
 */
@Entity
@Table(name = "family") 
public class Family extends BaseModel {
	private static final long serialVersionUID = 1L;
	
	public Family() {
	}
	
	public Family(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
	private Long id;
	/**
	 * 员工ID
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employee_id")
	private Employee employee;
	/**
	 * 姓名
	 */
	@Column(name = "name")
	private String familyname;
	/**
	 * 关系
	 */
	@Column(name = "relation")    		
	private String familyRelation;
	/**
	 * 联系方式
	 */
	@Column(name = "contact")    		
	private String contact;
	/**
	 * 年龄
	 */
	@Column(name = "age")    		
	private Integer familyage;
	/**
	 * 工作单位
	 */
	@Column(name = "company")    		
	private String familycompany;
	/**
	 * 职位
	 */
	@Column(name = "position")    		
	private String familyposition;
	// fields end
	
	/** id */
	public Long getId() {
    	return id;
    }
    /** id */
    public void setId(Long id) {
    	this.id = id;
    }
	/** 员工ID */
	public Employee getEmployee() {
    	return employee;
    }
    /** 员工ID */
    public void setEmployee(Employee employee) {
    	this.employee = employee;
    }
	/** 姓名 */
	public String getFamilyname() {
		return familyname;
	}

	public void setFamilyname(String familyname) {
		this.familyname = familyname;
	}

	public String getFamilyRelation() {
		return familyRelation;
	}

	public void setFamilyRelation(String familyRelation) {
		this.familyRelation = familyRelation;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public Integer getFamilyage() {
		return familyage;
	}

	public void setFamilyage(Integer familyage) {
		this.familyage = familyage;
	}

	public String getFamilycompany() {
		return familycompany;
	}

	public void setFamilycompany(String familycompany) {
		this.familycompany = familycompany;
	}

	public String getFamilyposition() {
		return familyposition;
	}

	public void setFamilyposition(String familyposition) {
		this.familyposition = familyposition;
	}
}
